import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from "@dfeidao/atom-web/msg/nodejs";
import render from "@dfeidao/atom-web/render/render";
// import whoami from '@dfeidao/atom-web/msg/whoami';
import p001 from './p001';

import set from '@dfeidao/atom-web/local/set';
import s_get from '@dfeidao/atom-web/storage/get';

// import { send_msg as url, get_user_info } from './config';


export default async function a005(fd: IFeidaoAiBrowserComponent, args: string) {
	//  调用事件
	fd.data.node.classList.remove('display-n');
	const a = args;
	// console.log(a)
	set(fd, 'ucode', a);

	// const user = await whoami(get_user_info);
	// console.log(user)
	const prid = await s_get('productid');
	const query = {
		filter: {
			productid: prid
		}
	};
	const res = await nodejs<{ a: string }>("consumer/zj-000005/consumer-find2", query);
	res.a = a;
	render(fd, res, p001, 'p001', 'inner');

}
